#ifndef __TLIB_H__
#define __TLIB_H__

#include <assert.h>
#include <stdio.h>

typedef unsigned char t_byte;

#define toupper(c) (c)+'A'-'a'
#define tolower(c) (c)+'a'-'A'

#ifndef cast
#define cast(t, exp) ((t)(exp))
#endif


#define T_MALLOC(FREE,SIZE,TYPE) T_Malloc(FREE,sizeof(TYPE)*SIZE)

static void	*T_Malloc(void *ptr,int size){
	void *p	= NULL;
	if(size == 0){
		free(ptr);
		return NULL;
	}else
		return realloc(ptr,size);

}


#endif
